package top.tsyz.entity;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import java.util.Date;

@Data
@NoArgsConstructor
@AllArgsConstructor
@ApiModel(description = "Shipment 实体类")
public class Shipment {

    @ApiModelProperty(value = "物流ID")
    private Long id;

    @ApiModelProperty(value = "订单ID")
    private Long orderId;

    @ApiModelProperty(value = "物流单号")
    @NotBlank(message = "物流单号不能为空")
    @Size(max = 100, message = "物流单号长度不能超过100个字符")
    private String shipmentNo;

    @ApiModelProperty(value = "物流公司")
    @Size(max = 100, message = "物流公司长度不能超过100个字符")
    private String shippingCompany;

    @ApiModelProperty(value = "物流跟踪信息")
    @Size(max = 65535, message = "物流跟踪信息长度不能超过65535个字符")
    private String trackingInfo;

    @ApiModelProperty(value = "物流状态 1-已发货 2-运输中 3-已签收")
    private Boolean status;

    @ApiModelProperty(value = "发货时间")
    private Date shippedAt;

    @ApiModelProperty(value = "签收时间")
    private Date deliveredAt;

    @ApiModelProperty(value = "创建时间")
    private Date createTime;

    @ApiModelProperty(value = "创建人")
    @Size(max = 50, message = "创建人长度不能超过50个字符")
    private String createUser;

    @ApiModelProperty(value = "更新时间")
    private Date updateTime;

    @ApiModelProperty(value = "更新人")
    @Size(max = 50, message = "更新人长度不能超过50个字符")
    private String updateUser;

    @ApiModelProperty(value = "逻辑删除 0-未删除 1-已删除")
    private Boolean isDeleted;

}
